package com.hand.wyc24548.domain.entity;

import java.util.Date;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;

import org.hibernate.validator.constraints.Length;

import com.fasterxml.jackson.annotation.JsonInclude;

import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;
import io.choerodon.mybatis.domain.AuditDomain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * @Author wangyc
 * @create 2019/8/6 9:09
 */

@ApiModel("物料信息")
@ModifyAudit
@VersionAudit
@Table(name = "hodr_item")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Item extends AuditDomain {

    @Id
    @GeneratedValue
    @ApiModelProperty("表ID，主键，供其他表做外键")
    private Long itemId;
    @Length(max = 60)
    @NotBlank
    @ApiModelProperty("物料编号")
    private String itemCode;
    @NotBlank
    @ApiModelProperty("物料单位")
    private String itemUom;
    @NotBlank
    @ApiModelProperty("物料描述")
    private String itemDescription;
    @NotBlank
    @ApiModelProperty("可销售标识，默认为1")
    private boolean saleableFlag;
    @ApiModelProperty("生效起始时间")
    private Date startActiveDate;
    @ApiModelProperty("生效结束时间")
    private Date endActiveDate;
    @NotBlank
    @ApiModelProperty("启用标识，默认为1")
    private boolean enabledFlag;

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

    public String getItemUom() {
        return itemUom;
    }

    public void setItemUom(String itemUom) {
        this.itemUom = itemUom;
    }

    public String getItemDescription() {
        return itemDescription;
    }

    public void setItemDescription(String itemDescription) {
        this.itemDescription = itemDescription;
    }

    public boolean isSaleableFlag() {
        return saleableFlag;
    }

    public void setSaleableFlag(boolean saleableFlag) {
        this.saleableFlag = saleableFlag;
    }

    public Date getStartActiveDate() {
        return startActiveDate;
    }

    public void setStartActiveDate(Date startActiveDate) {
        this.startActiveDate = startActiveDate;
    }

    public Date getEndActiveDate() {
        return endActiveDate;
    }

    public void setEndActiveDate(Date endActiveDate) {
        this.endActiveDate = endActiveDate;
    }

    public boolean isEnabledFlag() {
        return enabledFlag;
    }

    public void setEnabledFlag(boolean enabledFlag) {
        this.enabledFlag = enabledFlag;
    }
}
